home *** CD-ROM | disk | FTP | other *** search
- /* SMTP Stub */
- /* Created by Gaige B. Paulsen on 2-7-97 for testing */
- /* the smtp protocol */
- /* For use in conjunction with VS/TCP/IP routines fm NCSA*/
-
- #include <quickdraw.h>
- #define VTEKTYPE 1
-
-
- extern int scrn;
- int smnum=0,smactive;
- int smtproc();
-
- resetSMTP()
- {
- smactive=0;
- }
-
- setSMTP()
- {
- int temp;
-
- if (smnum) return(0);
- smactive=0;
- temp=netsegsize(512);
- smnum=netlisten(25,0); /* BYU 2.4.15 */
- netsegsize(temp);
- }
-
- rSMTPd()
- {
- if (smactive) return(0);
- if (!netest(smnum))
- smtproc();
- }
-
- smtproc()
- {
- int smscrn;
- if (smactive) return(0);
- if (netest(smnum)) return(0);
- smactive=1;
-
- smscrn=addport(smnum,VTEKTYPE,"\PSMTP",4);
- changeport(scrn,smscrn);
- }
-